﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;

namespace MentorMap.Web
{
    public abstract class MentorMapHttpModule : IHttpModule
    {
        protected HttpApplication Application { get; private set; }
        private EventHandler ev = null;

        #region IHttpModule Members

        public virtual void Dispose()
        {
            Application.BeginRequest -= ev;
            Application = null;
        }

        public virtual void Init(HttpApplication context)
        {
            Application = context;
            ev = new EventHandler(BeginRequest);
            Application.BeginRequest += ev;
        }

        #endregion

        protected virtual void BeginRequest(object src, EventArgs e)
        {
        }
    }
}
